package test1;

public class TestAnimal {

	public static void main(String[] args) {
		IAnimal animal = new IAnimal() {

			@Override
			public void talk() {
				System.out.println("The animal is talking!!!");
			}

			@Override
			public boolean couldEat(Object eat) {
				return true;
			}
		};
		IAnimal[] animals = { new Dog(), new Frogg(), new Kitten(),
				new Topcat(), animal };

		for (int i = 0; i < animals.length; i++) {
			animals[i].talk();
		}

	}
}
